package encapsulation;

/**
 * @classname:Administrator
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 10:13
 * @version: 0.1
 * @since:1.8
 */

public class Administrator {
    private String username;
    private int password;
    public Administrator() {
    }
    public Administrator(String username, int password) {
        this.username = username;
        this.password = password;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getPassword() {
        return password;
    }

    public void setPassword(int password) {
        this.password = password;
    }
    public void show(){
        System.out.println("用户名："+this.getUsername()+"/t密码"+this.getPassword());
    }
    public boolean register(String username,int password){

        if(!(this.username.equals(username)&&this.password==password)){
            return  false;
        }
        return true;
    }

}
